#!/usr/bin/env python3
# -*- coding: utf-8 -*-

from dragon.selector import Selector
from dragon.page import DraPage

class AlertSe:
    # 送会员提示
    giftAlert=Selector('#app > div:nth-child(4) > div > div:nth-child(1) > div:nth-child(2) > div:nth-child(1)','送会员提示')
    startButton=Selector('div.go-home','开启vip之旅按钮')
    # 战法下架提示
    unavailableTacticAlert=Selector('#app > div:nth-child(3) > div > div','战法下架提示')
    # 免责说明
    disclaimer = Selector('text=免责说明', '免责说明')
    # 到期提示
    expireAlert = Selector('#app > div:nth-child(3) > div > div > div:nth-child(2) > div:nth-child(1)', '会员到期提示')
    renewButton=Selector('text=一键续费','一键续费按钮')

class Alert:
    def __init__(self, draPage: DraPage):
        self.draPage=draPage
        self.giftAlert = draPage.locator(AlertSe.giftAlert)
        self.startButton = draPage.locator(AlertSe.startButton)
        self.unavailableTacticAlert = draPage.locator(AlertSe.unavailableTacticAlert)
        self.disclaimer = draPage.locator(AlertSe.disclaimer)
        self.expireAlert = draPage.locator(AlertSe.expireAlert)
        self.renewButton = draPage.locator(AlertSe.renewButton)